package com.example.pkmedical.Activity.warning;

import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.pkmedical.Base.BaseActivity;
import com.example.pkmedical.R;
import com.example.pkmedical.Utils.CommandUtil;
import com.example.pkmedical.Utils.FinishActivityManager;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class CrushionWarningActivity extends BaseActivity {

    @BindView(R.id.yellow_warning_top_text)
    TextView yellowWarningTopText;
    @BindView(R.id.crushi_warning_left_image)
    ImageView crushiWarningLeftImage;
    @BindView(R.id.yellow_warning_button)
    Button yellowWarningButton;
    @BindView(R.id.crushionwarning_back)
    RelativeLayout crushionwarningBack;
    @BindView(R.id.yellow_warning_text)
    TextView yellowWarningText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_crushionwarning);
        ButterKnife.bind(this);
    }

    @Override
    public void initData() {

    }

    @Override
    public void initView() {
        if (CommandUtil.CRUSHI_TYPE) {
            yellowWarningTopText.setText(getString(R.string.success));
            yellowWarningText.setText(getString(R.string.crushion_success));
            crushiWarningLeftImage.setImageResource(R.drawable.img_crushion_success);
            crushionwarningBack.setBackgroundColor(getResources().getColor(R.color.green_back));
        } else {
            yellowWarningTopText.setText(getString(R.string.error));
            yellowWarningText.setText(getString(R.string.crushion_error));
            crushiWarningLeftImage.setImageResource(R.drawable.img_crushion_error);
            crushionwarningBack.setBackgroundColor(getResources().getColor(R.color.red_back));
        }
        FinishActivityManager.getManager().addActivity(this);
    }

    @Override
    public void initPresenter() {

    }

    @Override
    public void showDialog(String... msg) {

    }

    @OnClick(R.id.yellow_warning_button)
    public void onViewClicked() {
        CrushionWarningActivity.this.finish();
    }
}
